<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue 事件修饰符</title>
  <style>
    .good-list {
      border: 1px solid red;
    }

    .good-item {
      height: 50px;
      line-height: 50px;
      display: flex;
      flex-direction: row;
      justify-content: space-around;
      align-items: center;
      border-bottom: 1px solid gray;
    }
  </style>
</head>

<body>
  <div id="app">
    <div>
      <input type="text" v-model="searchValue" @keyup.enter="searchFn">
    </div>
  </div>
  <script src="./vue.js"></script>
  <script>


    var vm = new Vue( {
      el: "#app",
      data: {
        searchValue: ''
      },
      methods: {
        searchFn () {
          console.log( this.searchValue )
        }
      }

    } )
  </script>
</body>

</html>